package edu.ynu.se.xiecheng.achitectureclass.common.repository;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends JpaRepository<User, String> {
    // 通过u_id查询用户
    @Query("SELECT u FROM User u WHERE u.u_id = :u_id")
    User findByUId(@Param("u_id") String u_id);
}
